#include <bits/stdc++.h>
using namespace std;
int p[600000];
int main() {
	freopen("duel.in", "r", stdin);
	freopen("duel.out", "w", stdout);
	int n;
	cin >> n;
	int t;
	for (int i =0; i < n; i++) {
		cin >> t;
		p[t]++;
	}
	int weaker = 0;
	for (int i = 0; i < 600000; i++) {
		weaker = max(0, weaker - p[i]);
		weaker += p[i];
	}
	cout << weaker;
}
